const http = require('../utils/http.js');

// 拼团列表
const getCollageList = (data) => {
    return http.request('GET', '/collage/collage_list', data, true)
}

// 拼团商品详情
const getCollageGoods = (data) => {
    return http.request('GET', '/collage/collage_goods', data, true)
}

// 拼团商品详情
const getCollageDetails = (data) => {
    return http.request('GET', '/collage/details', data, true)
}

const openCollage = (data) => {
    return http.request('POST', '/collage/open_collage', data, true)
}

const joinCollage = (data) => {
    return http.request('POST', '/collage/join_collage', data, true)
}

// 我的拼团列表
const myCollage = (data) => {
    return http.request('GET', '/collage/my_collage', data, true)
}

// 拼团商品详情-用户列表
const userList = (data) => {
    return http.request('GET', '/collage/user_list', data, true)
}

module.exports = {
    getCollageList,
    getCollageGoods,
    getCollageDetails,
    openCollage,
    joinCollage,
    myCollage,
    userList
}